﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.Factory_daily_weather_info>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	气象信息（每日）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
           bool result = (bool)ViewData["success"];
           if(result){ 
        %>
           <div style="margin-top:20px;font-weight:bold;color:blue;text-align:center">气象信息更新成功</div>
        <%
        }
        %>

    <% using (Html.BeginForm())
    {%>
        <%= Html.ValidationSummary(true) %>
        <%= Html.HiddenFor(model => model.factory_id) %>
        <%= Html.HiddenFor(model => model.date) %>
            
    <table class="tableCss" cellspacing="0" cellpadding="0" align="center" border="0" style="margin-top:10px;">
        <tr>
            <th colspan="2" class="heightrow" align="center" style="text-align:center">
                气象信息（每日）
            </th>
        </tr>
        
        <tr>
            <td class="row1" align="left" width="60px" style="padding-left:20px">日期：</td>
            <td class="row1" align="left">
                <%= Model.date.Year%>年<%=Model.date.Month%>月<%=Model.date.Day%>日
            </td>
        </tr>
        <tr>
            <td class="row1" align="left" width="30px" style="padding-left:20px">测量人员：</td>
            <td class="row1" align="left">
                <%= Html.DropDownList("tester_id", ViewData["users"] as List<SelectListItem>, "请选择", new { style = "width:150px" })%>
                <%= Html.ValidationMessageFor(model => model.tester_id)%>
            </td>
        </tr>
        <tr>
            <td class="row1" align="left" style="padding-left:20px">天气情况：</td>
            <td class="row1" align="left">
                <select name="weather">
                    <option value="1" <%if(Model.weather == 1){ %> selected="selected"<%} %>>晴</option>
                    <option value="2" <%if(Model.weather == 2){ %> selected="selected"<%} %>>多云</option>
                    <option value="3" <%if(Model.weather == 3){ %> selected="selected"<%} %>>阴</option>
                    <option value="4" <%if(Model.weather == 4){ %> selected="selected"<%} %>>小雨</option>
                    <option value="5" <%if(Model.weather == 5){ %> selected="selected"<%} %>>中雨</option>
                    <option value="6" <%if(Model.weather == 6){ %> selected="selected"<%} %>>大雨</option>
                    <option value="7" <%if(Model.weather == 7){ %> selected="selected"<%} %>>雾雪</option>
                    <option value="8" <%if(Model.weather == 8){ %> selected="selected"<%} %>>阵雨</option>
                    <option value="9" <%if(Model.weather == 9){ %> selected="selected"<%} %>>小雪</option>
                    <option value="10" <%if(Model.weather == 10){ %> selected="selected"<%} %>>中雪</option>
                    <option value="11" <%if(Model.weather == 11){ %> selected="selected"<%} %>>大雪</option>
                </select>
                <%= Html.ValidationMessageFor(model => model.weather)%>
            </td>
        </tr>
        <tr>
            <td class="row1" align="left" style="padding-left:20px">最高温度：</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.highest_temperature)%> ℃
                <%= Html.ValidationMessageFor(model => model.highest_temperature)%>
            </td>
        </tr>
        <tr>
            <td class="row1" align="left" style="padding-left:20px">最低温度：</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.lowest_temperature)%> ℃
                <%= Html.ValidationMessageFor(model => model.lowest_temperature)%>
            </td>
        </tr>

        <tr>
            <td class="row1" align="left" style="padding-left:20px">降雨量：</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.rainfall_capacity)%> mm
                <%= Html.ValidationMessageFor(model => model.rainfall_capacity)%>
            </td>
        </tr>

        <tr>
            <td class="row1" align="left" style="padding-left:20px">蒸发量：</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.evaporation_capacity)%> mm
                <%= Html.ValidationMessageFor(model => model.evaporation_capacity)%>
            </td>
        </tr>

        <tr>
            <td class="row1" align="left" style="padding-left:20px">风速：</td>
            <td class="row1" align="left">
                <select name="wind_speed">
                    <option value="1" <%if(Model.wind_speed == 1){ %> selected="selected"<%} %>>一级</option>
                    <option value="2" <%if(Model.wind_speed == 2){ %> selected="selected"<%} %>>二级</option>
                    <option value="3" <%if(Model.wind_speed == 3){ %> selected="selected"<%} %>>三级</option>
                    <option value="4" <%if(Model.wind_speed == 4){ %> selected="selected"<%} %>>四级</option>
                    <option value="5" <%if(Model.wind_speed == 5){ %> selected="selected"<%} %>>五级</option>
                    <option value="6" <%if(Model.wind_speed == 6){ %> selected="selected"<%} %>>六级</option>
                    <option value="7" <%if(Model.wind_speed == 7){ %> selected="selected"<%} %>>七级</option>
                    <option value="8" <%if(Model.wind_speed == 8){ %> selected="selected"<%} %>>八级</option>
                    <option value="9" <%if(Model.wind_speed == 9){ %> selected="selected"<%} %>>九级</option>
                    <option value="10" <%if(Model.wind_speed == 10){ %> selected="selected"<%} %>>十级</option>
                    <option value="11" <%if(Model.wind_speed == 11){ %> selected="selected"<%} %>>十一级</option>
                    <option value="12" <%if(Model.wind_speed == 12){ %> selected="selected"<%} %>>十二级</option>
                </select>
                <%= Html.ValidationMessageFor(model => model.wind_speed)%>
            </td>
        </tr>

        <tr>
            <td class="row1" align="left" style="padding-left:20px">湿度：</td>
            <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.hnmidity)%> %
                <%= Html.ValidationMessageFor(model => model.hnmidity)%>
            </td>
        </tr>
    </table>
    <div style="margin-top:25px;text-align:center">
        <input type="submit" value="提    交" style="font-size:16px;font-weight:bold" />
    </div>
    <% } %>
</asp:Content>
